package qc.module.ehs.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import qc.module.ehs.dto.respinsibility.UnitResponsibilitySetDto;
import qc.module.ehs.service.EhsUnitInfoService;

/**
 * 责任机制Controller
 * 
 * @author QuCheng Tech
 * @since 2024/11/4
 */
@RestController
@RequestMapping("/responsibility")
public class ResponsibilityController {
    
    @Autowired
    private EhsUnitInfoService service;

    /**
     * 设置单元责任制
     * 
     * @param dto 设置DTO
     * @return 成功返回null，失败返回错误或提示信息
     * @author QuCheng Tech
     * @since 2024/11/4
     */
    @RequestMapping(value = "/setunit",method = {RequestMethod.POST})
    public String setUnitResponsibility(@RequestBody UnitResponsibilitySetDto dto){
        return service.setUnitResponsibility(dto);
    }
}
